package com.zhanglijie.theory.workthread;

/**
 * @author zhanglijie
 * @version 1.0
 * @since 1.1.0 2022/8/14 0014 20:44
 * 地产商
 */
public class LandBaron  extends Thread{
    private ContractFolder contractFolder;

    public LandBaron(String name,ContractFolder contractFolder) {
        super(name);
        this.contractFolder = contractFolder;
    }

    @Override
    public void run() {
        for (int i = 0; i < 10; i++) {
            try {
                Contract contract = new Contract(i, this.getName()+"-contract" + i);
                contractFolder.putContract(contract);
            }catch (Exception e){}

        }

    }
}
